/*
 * This class saves all relevant information of a specific class passed
 * from the IScheduleParser.
 * 
 * @version 1.0
 * @date May 14, 2011
 * Started code
 * @version May 27, 2011
 * Thach extracted superclass Class Preference and removed extraneous methods & constructors.
 */
package data;

/**
 * @author Harmandeep Singh
 * @version 1.0
 * @date May 14, 2011
 * Started code
 * @version 1.1
 * @date May 18, 2011
 * Added credits field
 */
public class ClassSlot extends ClassPreference
{
	private String myClassTeacher;
	
	private TimeSlot myTimeSlot;
	
	/**
	 * Constructs a ClassSlot with values for its days,
	 * int values for its begin time, end times and credits
	 * , and String values for its class number, title, and teacher.
	 */
	public ClassSlot(TimeSlot theTimeSlot, String theClassNum, 
			String theClassTitle, char theClassSection, String theClassTeacher, 
			int theClassCredits)
	{
		super(theClassNum, theClassTitle, theClassSection, theClassCredits);
		myTimeSlot = theTimeSlot;
		myClassTeacher = theClassTeacher;
	}
	
	
	/**
	 * @return the TimeSlot
	 */
	public TimeSlot getTimeSlot() {
		return myTimeSlot;
	}
	
	/**
	 * @return the class teacher.
	 */
	public String getClassTeacher() {
		return myClassTeacher;
	}
	
	/**
	 * String representation of all the values
	 * of this ClassSlot.
	 */
	@Override
	public String toString() {
		return myTimeSlot.getDays().toString() + " " + 
		myTimeSlot.getStartTime() + " " + myTimeSlot.getEndTime() + " " + 
		getClassNum() + " " + getClassTitle() + " " + getClassSection() + " " + 
		myClassTeacher + " " + getClassCredits();
				
	}
}
